<template>
  <div class="wrap-table asd">
    <el-form
      ref="form"
      :model="searchData"
      label-width="100px"
      class="clearfix flex-div"
    >
      <el-form-item
        label="访谈日期"
        class
        label-width="70px"
        style="width: 340px;margin-bottom:22px"
      >
        <div class="block">
          <el-date-picker
            v-model="timeDate"
            type="daterange"
            align="right"
            unlink-panels
            range-separator="至"
            value-format="yyyy-MM-dd"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :picker-options="pickerOptions"
          ></el-date-picker>
        </div>
      </el-form-item>
      <el-form-item
        label="访谈人员类型"
        label-width="120px"
        class="pull-left item-right"
        style="width: 300px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.roleGroup"
          clearable
          placeholder="请选择"
        >
          <el-option value="" label="全部"></el-option>
          <el-option value="3" label="健康访谈人员"></el-option>
          <el-option value="7" label="社区HCP（干预组）"></el-option>
          <el-option value="8" label="社区HCP（对照组）"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="访谈时研究阶段"
        label-width="120px"
        class
        style="width: 220px;margin-bottom:22px"
      >
        <el-select v-model="searchData.period" clearable placeholder="请选择">
          <el-option
            v-for="item in options2sp"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="实际访谈类型"
        class
        label-width="120px"
        style="width: 250px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.actualFollowUpType"
          placeholder="全部"
        >
        <el-option value="" label="全部"></el-option>
          <el-option
            v-for="item in alls"
            :key="item.label+Math.random()"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="质控时间点"
        class
        label-width="120px"
        style="width: 220px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.pointOfTime"
          clearable
          placeholder="请选择"
        >
          <el-option
            v-for="item in optionZk"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="内部评估状态"
         v-if="RoleGroup != 13"
        label-width="120px"
        style="width: 220px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.insideState"
          clearable
          placeholder="请选择"
        >
          <el-option value label="全部"></el-option>
          <el-option value="0" label="待完成"></el-option>
          <el-option value="1" label="已完成"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        v-if="RoleGroup != 12"
        label="外部评估状态"
        label-width="120px"
        style="width: 220px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.outsideState"
          clearable
          placeholder="请选择"
        >
          <el-option value label="全部"></el-option>
          <el-option value="0" label="待完成"></el-option>
          <el-option value="1" label="已完成"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        v-if="RoleGroup < 3"
        label="能力评分一致性"
        label-width="120px"
        style="width: 220px;margin-bottom:22px"
      >
        <el-select
          v-model="searchData.scoreType"
          clearable
          placeholder="请选择"
        >
          <el-option value label="全部"></el-option>
          <el-option value="1" label="一致"></el-option>
          <el-option value="2" label="不一致"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item
        label="访谈人员"
        v-if="RoleGroup != 13"
        label-width="100px"
        class="item-right"
        style="width: 220px;margin-bottom:22px"
      >
        <el-select v-model="searchData.nurseId" clearable placeholder="请选择">
          <el-option
            v-for="item in SearchoptionsNurse"
            :key="item.NurseId"
            :label="item.NurseName"
            :value="item.NurseId"
          ></el-option>
        </el-select>
      </el-form-item>
      <div class="flex-r-but">
        <el-button
          type="primary"
          @click="checkList"
          class="pull-right mg-lr-20 pd-bt"
          >查询</el-button
        >
      </div>
    </el-form>
    <!---->
    <template>
      <el-table
        :data="tableData"
        border
        v-if="RoleGroup !=12 && RoleGroup !=13"
        v-loading="loading"
        element-loading-text="加载中"
        style="width: 100%"
      >
        <el-table-column
          prop="FollowUpDate"
          label="访谈日期"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="Nurse"
          label="访谈人员姓名"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="DistrictName"
          label="所在地区"
          :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="CName"
          label="所在社区"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="RoleGroup"
          label="访谈人员类型"
          :formatter="RoleGroupFilter"
          align="center"
          min-width="140"
        ></el-table-column>
         <el-table-column
          prop="Surname"
          label="姓名首字母"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ResearchNo"
          label="研究编号"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="Period"
          label="访谈时研究阶段"
          :formatter="PeriodFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ActualFollowUpType"
          label="实际访谈类型"
          :formatter="ActualFollowUpTypeFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ScheduleName"
          :show-overflow-tooltip="true"
          label="事项标题"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="PointOfTime"
          :formatter="PointOfTimeFilter"
          label="质控时间点"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column label="自我报告表" align="center" min-width="120">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.SelfReportState == 1"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 2)"
              >查看</el-button
            >

            <el-button
              style="color: #f00"
              v-else-if="scope.row.PointOfTime == 3 || scope.row.PointOfTime == 24"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 1)"
              >填写</el-button
            >
            <span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column label="录音文件" align="center" min-width="120">
           <template slot-scope="scope">
            <span
              style="cursor: pointer"
              @click="download(scope.row)"
              v-if="scope.row.SoundRecording"
              >下载音频
			  <i class="el-icon-download" style="color: #409eff"></i
            ></span>
            <!-- <audio :src="BASE_API+'/'+scope.row.SoundRecording"></audio> -->
          </template>
        </el-table-column>
        <el-table-column
          prop="SoundRecordingUploadTime"
          label="录音上传时间"
           :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        >
        </el-table-column>
        <el-table-column min-width="120" align="center" label="自我反馈表">
          <template slot-scope="scope">
              <el-button
                v-if="scope.row.SelfFeedbackState == 1"
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 2)"
                >查看</el-button
              >
              <el-button
                style="color: #f00"
                v-else
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 1)"
                >填写</el-button
              >
          </template>
        </el-table-column>
        <el-table-column
          label="能力评分工具(内部)"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <span style="color:#409EFF;margin-left:-10px;">{{scope.row.InAvarageScore}}</span>
            <el-button
              v-if="scope.row.InsideScoringToolState == 1"
              size="small"
              type="text"
              @click="handleScore(scope.row, 2,1)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleScore(scope.row, 1,1)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          label="现场观察案例报告表"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.FieldObservationCaseReportState ==1"
              size="small"
              type="text"
              @click="handleReport(scope.row, 2,)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else-if="scope.row.FieldObservationCaseReportState ==2"
              size="small"
              type="text"
              @click="handleReport(scope.row, 1,)"
              >填写</el-button
            >
            <span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column
          label="健康访谈流程质控CRF"
          align="center"
          min-width="120"
        >
           <template slot-scope="scope">
            <el-button
              v-if="scope.row.CRFState == 1"
              size="small"
              type="text"
              @click="handleCRF(scope.row, 2)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleCRF(scope.row, 1)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideRemark"
          label="内部评估备注"
          align="center"
          min-width="160"
        >
          <template slot-scope="scope">
            <el-input
              @blur="changeFollowUp(scope.row, scope.row.InsideRemark,1)"
              :disabled="RoleGroup <3"
              v-model="scope.row.InsideRemark"
              placeholder="内部评估备注"
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideState"
          label="内部评估状态"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            <el-select
              v-model="scope.row.InsideState"
               :disabled="RoleGroup <3"
              placeholder="请选择"
              @change="changeFollowUp(scope.row, scope.row.InsideState,1)"
            >
              <el-option value="0" label="待完成"></el-option>
              <el-option value="1" label="已完成"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideTime"
          label="内部评估日期"
          align="center"
          min-width="120"
           :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          prop="InsideNurse"
          label="评估人员姓名"
          align="center"
          min-width="120"
        >
        </el-table-column>
        <el-table-column
          prop="OutsideScoringToolState"
          label="能力评分工具(外部)"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <span style="color:#409EFF;margin-left:-10px;">{{scope.row.OutAvarageScore}}</span>
            <el-button
              v-if="scope.row.OutsideScoringToolState == 1"
              size="small"
              type="text"
              @click="handleScore(scope.row, 2,2)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleScore(scope.row, 1,2)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="OutsideRemark"
          label="外部评估备注"
          align="center"
          min-width="160"
        >
          <template slot-scope="scope">
            <el-input
             :disabled="RoleGroup <3"
              @blur="changeFollowUp(scope.row, scope.row.OutsideRemark,2)"
              v-model="scope.row.OutsideRemark"
              placeholder="外部评估备注"
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideState"
          label="外部评估状态"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            <el-select
             :disabled="RoleGroup <3"
              v-model="scope.row.OutsideState"
              placeholder="请选择"
              @change="changeFollowUp(scope.row, scope.row.OutsideState,2)"
            >
              <el-option value="0" label="待完成"></el-option>
              <el-option value="1" label="已完成"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column
          prop="OutsideTime"
          label="外部评估日期"
           :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        >
        </el-table-column>
        <el-table-column
          prop="OutsideNurse"
          label="评估人员姓名"
          align="center"
          min-width="120"
        >
        </el-table-column>
      </el-table>
      <el-table
        :data="tableData"
        border
        v-else-if="RoleGroup ==12"
        v-loading="loading"
        element-loading-text="加载中"
        style="width: 100%"
      >
        <el-table-column
          prop="FollowUpDate"
          label="访谈日期"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="Nurse"
          label="访谈人员姓名"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="DistrictName"
          label="所在地区"
          :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="CName"
          label="所在社区"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="RoleGroup"
          label="访谈人员类型"
          :formatter="RoleGroupFilter"
          align="center"
          min-width="140"
        ></el-table-column>
         <el-table-column
          prop="Surname"
          label="姓名首字母"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ResearchNo"
          label="研究编号"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="Period"
          label="访谈时研究阶段"
          :formatter="PeriodFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ActualFollowUpType"
          label="实际访谈类型"
          :formatter="ActualFollowUpTypeFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ScheduleName"
          :show-overflow-tooltip="true"
          label="事项标题"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="PointOfTime"
          :formatter="PointOfTimeFilter"
          label="质控时间点"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column label="自我报告表" align="center" min-width="120">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.SelfReportState == 1"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 2)"
              >查看</el-button
            >

            <el-button
              style="color: #f00"
              v-else-if="scope.row.PointOfTime == 3 || scope.row.PointOfTime == 24"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 1)"
              >填写</el-button
            >
            <span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column label="录音文件" align="center" min-width="120">
           <template slot-scope="scope">
            <span
              style="cursor: pointer"
              @click="download(scope.row)"
              v-if="scope.row.SoundRecording"
              >下载音频<i class="el-icon-download" style="color: #409eff"></i
            ></span>
            <!-- <audio :src="BASE_API+'/'+scope.row.SoundRecording"></audio> -->
          </template>
        </el-table-column>
        <el-table-column
          prop="SoundRecordingUploadTime"
          label="录音上传时间"
           :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        >
        </el-table-column>
        <el-table-column min-width="120" align="center" label="自我反馈表">
          <template slot-scope="scope">
              <el-button
                v-if="scope.row.SelfFeedbackState == 1"
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 2)"
                >查看</el-button
              >
              <el-button
                style="color: #f00"
                v-else
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 1)"
                >填写</el-button
              >
          </template>
        </el-table-column>
        <el-table-column
          label="能力评分工具(内部)"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <span style="color:#409EFF;margin-left:-10px;">{{scope.row.InAvarageScore}}</span>
            <el-button
              v-if="scope.row.InsideScoringToolState == 1"
              size="small"
              type="text"
              @click="handleScore(scope.row, 2,1)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleScore(scope.row, 1,1)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          label="现场观察案例报告表"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.FieldObservationCaseReportState == 1"
              size="small"
              type="text"
              @click="handleReport(scope.row, 2,)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else-if="scope.row.FieldObservationCaseReportState == 2"
              size="small"
              type="text"
              @click="handleReport(scope.row, 1,)"
              >填写</el-button
            >
			<span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column
          label="健康访谈流程质控CRF"
          align="center"
          min-width="120"
        >
           <template slot-scope="scope">
            <el-button
              v-if="scope.row.CRFState == 1"
              size="small"
              type="text"
              @click="handleCRF(scope.row, 2)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleCRF(scope.row, 1)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideRemark"
          label="内部评估备注"
          align="center"
          min-width="160"
        >
          <template slot-scope="scope">
            <el-input
              @blur="changeFollowUp(scope.row, scope.row.InsideRemark,1)"
              v-model="scope.row.InsideRemark"
              placeholder="内部评估备注"
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideState"
          label="内部评估状态"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            <el-select
              v-model="scope.row.InsideState"
              placeholder="请选择"
              @change="changeFollowUp(scope.row, scope.row.InsideState,1)"
            >
              <el-option value="0" label="待完成"></el-option>
              <el-option value="1" label="已完成"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideTime"
          label="内部评估日期"
          align="center"
          min-width="120"
           :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          prop="InsideNurse"
          label="评估人员姓名"
          align="center"
          min-width="120"
        >
        </el-table-column>
      </el-table>
       <el-table
        :data="tableData"
        border
        v-else-if=" RoleGroup ==13"
        v-loading="loading"
        element-loading-text="加载中"
        style="width: 100%"
      >
        <el-table-column
          prop="FollowUpDate"
          label="访谈日期"
          align="center"
          min-width="120"
        ></el-table-column>
       <el-table-column
          prop="RoleGroup"
          label="访谈人员类型"
          :formatter="RoleGroupFilter"
          align="center"
          min-width="140"
        ></el-table-column>
        <el-table-column
          prop="Period"
          label="访谈时研究阶段"
          :formatter="PeriodFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ActualFollowUpType"
          label="实际访谈类型"
          :formatter="ActualFollowUpTypeFilter"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="ScheduleName"
          :show-overflow-tooltip="true"
          label="事项标题"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column
          prop="PointOfTime"
          :formatter="PointOfTimeFilter"
          label="质控时间点"
          align="center"
          min-width="120"
        ></el-table-column>
        <el-table-column label="自我报告表" align="center" min-width="120">
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.SelfReportState == 1"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 2)"
              >查看</el-button
            >

            <el-button
              style="color: #f00"
              v-else-if="scope.row.PointOfTime == 3 || scope.row.PointOfTime == 24"
              size="small"
              type="text"
              @click="handleSelfReport(scope.row, 1)"
              >填写</el-button
            >
            <span v-else>-</span>
          </template>
        </el-table-column>
        <el-table-column label="录音文件" align="center" min-width="120">
           <template slot-scope="scope">
            <span
              style="cursor: pointer"
              @click="download(scope.row)"
              v-if="scope.row.SoundRecording"
              >{{ scope.row.SoundRecording
              }}<i class="el-icon-download" style="color: #409eff"></i
            ></span>
            <!-- <audio :src="BASE_API+'/'+scope.row.SoundRecording"></audio> -->
          </template>
        </el-table-column>
        <el-table-column
          prop="SoundRecordingUploadTime"
          label="录音上传时间"
           :show-overflow-tooltip="true"
          align="center"
          min-width="120"
        >
        </el-table-column>
        <el-table-column min-width="120" align="center" label="自我反馈表">
          <template slot-scope="scope">
              <el-button
                v-if="scope.row.SelfFeedbackState == 1"
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 2)"
                >查看</el-button
              >
              <el-button
                style="color: #f00"
                v-else
                size="small"
                type="text"
                @click="handleFeedback(scope.row, 1)"
                >填写</el-button
              >
          </template>
        </el-table-column>
        
        <el-table-column
          prop="OutsideScoringToolState"
          label="能力评分工具(外部)"
          align="center"
          min-width="120"
        >
          <template slot-scope="scope">
            <span style="color:#409EFF;margin-left:-10px;">{{scope.row.OutAvarageScore}}</span>
            <el-button
              v-if="scope.row.OutsideScoringToolState == 1"
              size="small"
              type="text"
              @click="handleScore(scope.row, 2,2)"
              >查看</el-button
            >
            <el-button
              style="color: #f00"
              v-else
              size="small"
              type="text"
              @click="handleScore(scope.row, 1,2)"
              >填写</el-button
            >
          </template>
        </el-table-column>
        <el-table-column
          prop="OutsideRemark"
          label="外部评估备注"
          align="center"
          min-width="160"
        >
          <template slot-scope="scope">
            <el-input
              @blur="changeFollowUp(scope.row, scope.row.OutsideRemark,2)"
              v-model="scope.row.OutsideRemark"
              placeholder="外部评估备注"
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column
          prop="InsideState"
          label="外部评估状态"
          align="center"
          min-width="180"
        >
          <template slot-scope="scope">
            <el-select
              v-model="scope.row.OutsideState"
              placeholder="请选择"
              @change="changeFollowUp(scope.row, scope.row.OutsideState,2)"
            >
              <el-option value="0" label="待完成"></el-option>
              <el-option value="1" label="已完成"></el-option>
            </el-select>
          </template>
        </el-table-column>
        <el-table-column
          prop="OutsideTime"
          label="外部评估日期"
          align="center"
          min-width="120"
           :show-overflow-tooltip="true"
        >
        </el-table-column>
        <el-table-column
          prop="OutsideNurse"
          label="评估人员姓名"
          align="center"
          min-width="120"
        >
        </el-table-column>
      </el-table>
    </template>
    <!--分页-->
    <div class="block mg-20-auto pagination-fixed">
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page.sync="pageId"
        :page-sizes="[10, 20, 30, 40]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      ></el-pagination>
    </div>
    <el-dialog
      title="能力评分工具"
      :visible.sync="dialogForm1"
      :append-to-body="true"
      class="asd"
      :before-close="closeed('formScore')"
      top="0"
      width="60%"
      :close-on-click-modal="false"
    >
      <div style="margin-right: 20px">
        <el-form
          :model="formScore"
          :rules="rules1"
          label-position="left"
          ref="formScore"
          label-width="0"
          class="demo-ruleForm"
        >
          <div class="formScore">
            <ul>
              <li>
                <h3><span style="color:#f00">*</span>1、询问开放探索式问题</h3>
                <el-form-item label-width="" label="" prop="Question">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.Question"
                  >
                  </el-input>
                </el-form-item>
                <div
                  style="display: flex; align-items: center; margin-top: 20px"
                >
                  <p style="margin-right: 10px" >评分</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    v-if="formScore.Question_AssessState !=1"
                    label=""
                    prop="Question_Score"
                  >
                    <el-select
                      size="small"
                      v-model="formScore.Question_Score"

                      @change="changeScore"
                      placeholder="请选择"
                      style="width: 90px"
                    >
                      <el-option label="0" value="0"></el-option>
                      <el-option label="1" value="1"></el-option>
                      <el-option label="2" value="2"></el-option>
                      <el-option label="3" value="3"></el-option>
                      <el-option label="4" value="4"></el-option>
                    </el-select>
                  </el-form-item>
                  <p style="margin: 0px 10px 0 80px">无法评估</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    label=""
                    prop="Question_AssessState"
                  >
                    <el-switch
                      v-model="formScore.Question_AssessState"
                      @change="changeScore"
                      active-text="是"
                      active-value="1"
                      inactive-value="0"
                      inactive-text="否"
                      active-color="#13ce66"
                    >
                    </el-switch>
                  </el-form-item>
                    <div>
                    <el-form-item
                    v-if="formScore.Question_AssessState == 1"
                    style="margin-bottom:0;margin-left:30px"
                    label-width=""
                    label=""
                    prop="Question_UnAssessReason"
                  >
                    <el-input
                      placeholder="限50字"
                      size="small"
                      v-model="formScore.Question_UnAssessReason"
                    >
                    </el-input>
                  </el-form-item>
                </div>

                </div>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>2、自我练习的反馈</h3>
                <el-form-item label-width="" label="" prop="Feedback">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.Feedback"
                  >
                  </el-input>
                </el-form-item>
                <div
                  style="display: flex; align-items: center; margin-top: 20px"
                >
                  <p style="margin-right: 10px">评分</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    v-if="formScore.Feedback_AssessState!=1"
                    label=""
                    prop="Feedback_Score"
                  >
                    <el-select
                      size="small"
                      v-model="formScore.Feedback_Score"
                      @change="changeScore"
                      placeholder="请选择"
                      style="width: 90px"
                    >
                      <el-option label="0" value="0"></el-option>
                      <el-option label="1" value="1"></el-option>
                      <el-option label="2" value="2"></el-option>
                      <el-option label="3" value="3"></el-option>
                      <el-option label="4" value="4"></el-option>
                    </el-select>
                  </el-form-item>
                  <p style="margin: 0px 10px 0 80px">无法评估</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    label=""
                    prop="Feedback_AssessState"
                  >
                    <el-switch
                      v-model="formScore.Feedback_AssessState"
                      @change="changeScore"
                      active-text="是"
                      :active-value="1"
                      :inactive-value="0"
                      inactive-text="否"
                      active-color="#13ce66"
                    >
                    </el-switch>
                  </el-form-item>
                  <div>
                  <el-form-item
                    v-if="formScore.Feedback_AssessState == 1"
                    style="margin-bottom:0;margin-left:30px;"
                    label-width=""
                    label=""
                    prop="Feedback_UnAssessReason"
                  >
                    <el-input
                      placeholder="限50字"
                      size="small"
                      v-model="formScore.Feedback_UnAssessReason"
                    >
                    </el-input>
                  </el-form-item>
                  </div>
                </div>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>3、倾听时间超过说教时间</h3>
                <el-form-item label-width="" label="" prop="Listen">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.Listen"
                  >
                  </el-input>
                </el-form-item>
                <div
                  style="display: flex; align-items: center; margin-top: 20px"
                >
                  <p style="margin-right: 10px">评分</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    v-if="formScore.Listen_AssessState!=1"
                    label=""
                    prop="Listen_Score"
                  >
                    <el-select
                      size="small"
                      v-model="formScore.Listen_Score"
                      @change="changeScore"
                      placeholder="请选择"
                      style="width: 90px"
                    >
                      <el-option label="0" value="0"></el-option>
                      <el-option label="1" value="1"></el-option>
                      <el-option label="2" value="2"></el-option>
                      <el-option label="3" value="3"></el-option>
                      <el-option label="4" value="4"></el-option>
                    </el-select>
                  </el-form-item>
                  <p style="margin: 0px 10px 0 80px">无法评估</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    label=""
                    prop="Listen_AssessState"
                  >
                    <el-switch
                      v-model="formScore.Listen_AssessState"
                      active-text="是"
                      @change="changeScore"
                      inactive-text="否"
                      active-value="1"
                      inactive-value="0"
                      active-color="#13ce66"
                    >
                    </el-switch>
                  </el-form-item>
                  <div>
                  <el-form-item
                    v-if="formScore.Listen_AssessState == 1"
                    style="margin-bottom:0;margin-left:30px;"
                    label-width=""
                    label=""
                    prop="Listen_UnAssessReason"
                  >
                    <el-input
                      placeholder="限50字"
                      size="small"
                      v-model="formScore.Listen_UnAssessReason"
                    >
                    </el-input>
                  </el-form-item>
                  </div>
                </div>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>4、制定SMARTER目标支持计划</h3>
                <el-form-item label-width="" label="" prop="SmarterPlan">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.SmarterPlan"
                  >
                  </el-input>
                </el-form-item>
                <div
                  style="
                    display: flex;
                    align-items: center;
                    margin-top: 20px;
                    margin-bottom: 20px;
                  "
                >
                  <p style="margin-right: 10px">评分</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    label=""
                    v-if="formScore.Plan_AssessState!=1"
                    prop="Plan_Score"
                  >
                    <el-select
                      size="small"
                      v-model="formScore.Plan_Score"
                      @change="changeScore"
                      placeholder="请选择"
                      style="width: 90px"
                    >
                      <el-option label="0" value="0"></el-option>
                      <el-option label="1" value="1"></el-option>
                      <el-option label="2" value="2"></el-option>
                      <el-option label="3" value="3"></el-option>
                      <el-option label="4" value="4"></el-option>
                    </el-select>
                  </el-form-item>
                  <p style="margin: 0px 10px 0 80px">无法评估</p>
                  <el-form-item
                    style="margin-bottom:0"
                    label-width=""
                    label=""
                    prop="Plan_AssessState"
                  >
                    <el-switch
                      v-model="formScore.Plan_AssessState"
                      active-text="是"
                      @change="changeScore"
                      inactive-text="否"
                      active-value="1"
                      inactive-value="0"
                      active-color="#13ce66"
                    >
                    </el-switch>
                  </el-form-item>
                  <div>
                  <el-form-item
                  v-if="formScore.Plan_AssessState==1"
                    style="margin-bottom:0;margin-left:30px;"
                    label-width=""
                    label=""
                    prop="Plan_UnAssessReason"
                  >
                    <el-input
                      placeholder="限50字"
                      size="small"
                      v-model="formScore.Plan_UnAssessReason"
                    >
                    </el-input>
                  </el-form-item>
                  </div>
                </div>
                <h3><span style="color:#f00">*</span>评分备注/培训/健康访谈技巧的使用</h3>
                <el-form-item label-width="" label="" prop="SkillUse">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.SkillUse"
                  >
                  </el-input>
                </el-form-item>
                <h3 style="margin: 20px 0">总得分:{{formScore.TotalScore}}<span>平均分:{{formScore.AvarageScore}}</span></h3>
                <p style="color: #999">
                  *如果某项无法评估，则该项不计入平均分。例如，如果第三项无法评估，最后的平均分应是其他三项得分的平均值。无法评估的原因必须被记录。
                </p>
              </li>
              <li>
                <el-form-item
                  label-width="300px"
                  required
                  label="给予执行者的反馈（护士/医护人员）："
                  prop="FeedbackToExecutor"
                >
                  <el-radio v-model="formScore.FeedbackToExecutor" label="1"
                    >是</el-radio
                  >
                  <el-radio v-model="formScore.FeedbackToExecutor" label="2"
                    >否</el-radio
                  >
                </el-form-item>
                <p style="color: #999; margin: 10px 0px">
                  （如果否定，请根据你的观察给予执行者反馈并讨论她/他怎样能提高健康访谈技巧。你也可以使用《同伴支持与反馈指南》来指导讨论）
                </p>
                <h3 style="margin: 30px 0 10px 0">
                  <span style="color:#f00">*</span>反馈期间讨论的问题（例如：提高访谈技巧，怎样或如何顺利进行等）
                </h3>
                <el-form-item label-width="" label="" prop="DiscussQuestion">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px"
                    required
                    :rows="3"
                    placeholder="限500字"
                    v-model="formScore.DiscussQuestion"
                  >
                  </el-input>
                </el-form-item>
                <el-form-item
                  label-width="300px"
                  label="是否需要现场观察："
                  required
                  prop="NeedView"
                >
                  <el-radio v-model="formScore.NeedView" label="1">是</el-radio>
                  <el-radio v-model="formScore.NeedView" label="2">否</el-radio>
                </el-form-item>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogForm1 = false">取 消</el-button>
        <el-button type="primary" v-if="RoleGroup>2" @click="submitScore('formScore')"
          >保 存</el-button
        >
      </div>
    </el-dialog>
      <!---->
    <el-dialog
      title="自我反馈表"
      :visible.sync="dialogForm6"
      :append-to-body="true"
      class="asd"
      top="0"
      width="60%"
      :close-on-click-modal="false"
    >
      <div style="margin-right: 20px">
        <el-form
          :model="formFeedback"
          label-position="left"
          ref="formFeedback"
          label-width="0"
          class="demo-ruleForm"
        >
          <div class="formScore">
            <ul>
              <li>
                <h3><span style="color:#f00">*</span>你觉得访谈进行得怎么样？</h3>
                <el-form-item label-width="" label="" prop="HowInterview">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.HowInterview"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>能够轻松地询问开放探索式问题吗？</h3>
                <el-form-item label-width="" label="" prop="AskEasily">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.AskEasily"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>访谈的什么部分进行得顺利？</h3>
                <el-form-item label-width="" label="" prop="SmoothPart">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.SmoothPart"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>你认为你什么地方可以做得更好？</h3>
                <el-form-item label-width="" label="" prop="DoBetter">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.DoBetter"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>你可以做什么来支持他人进行改变？</h3>
                <el-form-item label-width="" label="" prop="DoChange">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.DoChange"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <h3><span style="color:#f00">*</span>下次你的访谈会有什么不同？</h3>
                <el-form-item label-width="" label="" prop="NextDifferent">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px; margin-bottom: 20px"
                    :rows="5"
                    placeholder="限500字"
                    v-model="formFeedback.NextDifferent"
                  >
                  </el-input>
                </el-form-item>
              </li>
              <li>
                <p>
                  <span style="color:#f00">*</span>当你与他人进行关于健康生活习惯的谈话时，你有多自信？（例如：健康饮食，健康运动）（1代表一点也不自信；10代表非常自信）
                </p>
                <el-form-item label-width="" label="" prop="ConfidenceLevel">
                  <el-slider
                    v-model="formFeedback.ConfidenceLevel"
                    :step="1"
                    height="30"
                    input-size="large"
                    :max="10"
                    :min="0"
                    show-stops
                  >
                  </el-slider>
                </el-form-item>
              </li>
              <li>
                <p>
                  <span style="color:#f00">*</span>对你来说，帮助他人改变他们的生活习惯有多重要？（1代表一点也不重要；10代表非常重要）
                </p>
                <el-form-item label-width="" label="" prop="Importance">
                  <!-- <el-rate
                    v-model="formFeedback.Importance"
                    :max="10"
                    >
                  </el-rate> -->
                  <el-slider
                    v-model="formFeedback.Importance"
                    :step="1"
                    height="30"
                    input-size="large"
                    :max="10"
                    :min="0"
                    show-stops
                  >
                  </el-slider>
                </el-form-item>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">

        <el-button @click="dialogForm6 = false">取 消</el-button>
      </div>
    </el-dialog>
    <!--现场观察表-->
    <el-dialog
      title="现场观察案例报告表"
      :visible.sync="dialogForm2"
      :append-to-body="true"
      class="asd"
      top="0"
      width="60%"
      :close-on-click-modal="false"
    >
      <div style="margin-right: 20px">
        <el-form
          :model="formReport"
          :rules="rules2"
          label-position="left"
          ref="formReport"
          label-width="0"
          class="demo-ruleForm"
        >
          <div class="formScore">
            <ul>
              <li>
                <h3><span style="color:#f00">*</span>观察笔记（你可以使用《同伴支持与反馈指南》中的要点进行重点观察）</h3>
                <el-form-item label-width="" label="" prop="ObservationNote">
                  <el-input
                    type="textarea"
                    style="margin-top: 15px;margin-bottom:20px"
                    :rows="5"
                    placeholder="限2000字"
                    v-model="formReport.ObservationNote"
                  >
                  </el-input>
                </el-form-item>
                 <el-form-item
                  label-width="400px"
                  style="margin:15px 0px"
                  label="1、给予健康访谈提供者（护士/医护人员）的反馈："
                  prop="FeedbackToExecutor"
                >
                  <el-radio v-model="formReport.FeedbackToExecutor" label="1">肯定</el-radio>
                  <el-radio v-model="formReport.FeedbackToExecutor" label="2">否定</el-radio>
                </el-form-item>
                 <p style="color: #999; margin: 10px 0px">
                  （如果否定，请根据你的观察给予执行者反馈并讨论她/他应该怎样进一步提高健康访谈技巧。你也可以使用《同伴支持与反馈指南》来指导讨论）
                </p>
                  <h3    style="margin-top: 30px;margin-bottom:20px"><span style="color:#f00">*</span>2、反馈期间讨论的问题（例如：如何提高访谈技巧，什么部分进行顺利等）</h3>
                  <el-form-item
                    label-width=""
                    label=""
                    prop="DiscussQuestion"
                  >
                    <el-input
                      placeholder="限2000字"
                      type="textarea"
                       :rows="5"
                      v-model="formReport.DiscussQuestion"
                    >
                    </el-input>
                  </el-form-item>
                   <h3  style="margin-top: 30px;margin-bottom:20px"><span style="color:#f00">*</span>3、其他评论</h3>
                  <el-form-item
                    label-width=""
                    label=""
                    prop="OtherDiscuss"
                  >
                    <el-input
                      placeholder="限2000字"
                      type="textarea"
                       :rows="5"
                      v-model="formReport.OtherDiscuss"
                    >
                    </el-input>
                  </el-form-item>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="removeReport" v-if="RoleGroup == 1 && dataObj.FieldObservationCaseReportState == 1" class="pull-left" type="danger">删 除</el-button>
        <el-button @click="dialogForm2 = false">取 消</el-button>
        <el-button type="primary" v-if="RoleGroup>2" @click="submitReport('formReport')"
          >保 存</el-button
        >
      </div>
    </el-dialog>

    <!--质控crf-->
     <el-dialog
      title="健康访谈流程质控CRF"
      :visible.sync="dialogForm3"
      :append-to-body="true"
      class="asd"
      top="0"
      width="60%"
      :close-on-click-modal="false"
    >
      <div style="margin-right: 20px">
        <el-form
          :model="formCrf"
          :rules="rules3"
          label-position="left"
          ref="formCrf"
          label-width="0"
          class="demo-ruleForm"
        >
          <div class="formScore">
            <ul>
              <li>
                <h3 style="font-size:14px;color:#333;margin:10px 0">说明：</h3>
                <p>本表格旨在评估提供健康访谈的医护人员在健康访谈过程中是否遵循了所要求的步骤。请核对下列各项内容。</p>
                <p style="margin:10px 0 30px 0">如果流程中出现任何偏差(如行动计划未完成、出现新的风险因素未评估等)，请在生命树网站上留言或直接通过电话或去现场亲自通知相关的医护人员。</p>
                 <el-form-item
                  label-width="400px"
                  label="1、《健康现状表》是否为最新版?"
                  style="margin:15px 0"
                  required
                  prop="IsNewestHealthTable"
                >
                  <el-radio v-model="formCrf.IsNewestHealthTable" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsNewestHealthTable" label="2">否</el-radio>
                </el-form-item>
                <el-form-item
                  label-width="390px"
                  style="margin:15px 0;padding-left:10px"
                  label="2、产前：是否完成产前体重跟踪检查？"
                >
                  <el-radio v-model="formCrf.IsCompletePreWeight" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompletePreWeight" label="2">否</el-radio>
                  <el-radio v-model="formCrf.IsCompletePreWeight" label="0">无</el-radio>
                </el-form-item>
                <el-form-item
                  label-width="390px"
                  style="margin:15px 0;padding-left:10px"
                  label="3、产后：是否完成儿童发育追踪？"
                >
                  <el-radio v-model="formCrf.IsCompleteChildDevelopment" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompleteChildDevelopment" label="2">否</el-radio>
                  <el-radio v-model="formCrf.IsCompleteChildDevelopment" label="0">无</el-radio>
                </el-form-item>
                <el-form-item
                  label-width="400px"
                  style="margin:15px 0;"
                  required
                  label="4、健康访谈的实际持续时间是否与计划的持续时间相符?"
                  prop="IsActualMatchPlan"
                >
                  <el-radio v-model="formCrf.IsActualMatchPlan" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsActualMatchPlan" label="2">否</el-radio>
                </el-form-item>
                 <el-form-item
                  label-width="400px"
                  style="margin:15px 0"
                  required
                  label="5、是否完成进行人体学测量？"
                  prop="IsCompleteAnthropometry"
                >
                  <el-radio v-model="formCrf.IsCompleteAnthropometry" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompleteAnthropometry" label="2">否</el-radio>
                </el-form-item>
                 <el-form-item
                  label-width="400px"
                  style="margin:15px 0"
                  required
                  label="6、是否完成《习惯登记表》？"
                  prop="IsCompleteCustomRecord"
                >
                  <el-radio v-model="formCrf.IsCompleteCustomRecord" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompleteCustomRecord" label="2">否</el-radio>
                </el-form-item>
                 <el-form-item
                  label-width="400px"
                  style="margin:15px 0"
                  required
                  label="7、是否完成计划行动方案？ "
                  prop="IsCompletePlan"
                >
                  <el-radio v-model="formCrf.IsCompletePlan" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompletePlan" label="2">否</el-radio>
                </el-form-item>
                 <el-form-item
                  label-width="400px"
                  style="margin:15px 0"
                  required
                  label="8、是否完成健康访谈 CRF？ "
                  prop="IsCompleteCRF"
                >
                  <el-radio v-model="formCrf.IsCompleteCRF" label="1">是</el-radio>
                  <el-radio v-model="formCrf.IsCompleteCRF" label="2">否</el-radio>
                </el-form-item>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogForm3 = false">取 消</el-button>
        <el-button type="primary" v-if="RoleGroup>2" @click="submitCrf('formCrf')"
          >保 存</el-button
        >
      </div>
    </el-dialog>

     <!--健康访谈人员自我报告问卷-->
    <el-dialog
      title="健康访谈人员自我报告问卷"
      :visible.sync="dialogForm9"
      :append-to-body="true"
      class="asd"
      top="0"
      width="60%"
      :close-on-click-modal="false"
    >
      <div style="margin-right: 20px">
        <el-form
          :model="formQues"
          label-position="left"
          ref="formQues"
          label-width="0"
          class="demo-ruleForm"
        >
          <div class="formScore">
            <p style="text-align: center; margin: 10px 0px">
              这份问卷旨在了解您对健康访谈技巧和对生命树项目研究对象运用健康访谈技巧的经验和认知。
            </p>
            <p style="text-align: center; margin: 10px 0px">
              对下列问题，请您勾选适用的选项。回答没有对错之分。这份问卷大约需要10分钟完成。
            </p>
            <p style="text-align: center; margin: 10px 0px; color: #409eff">
              （请注意生命树项目需要您在两个时间点的反馈，这是第二次也是最后一次的反馈。）
            </p>
            <h5 style="text-align: center; margin: 20px 0px; font-size: 16px">
              您的生命树项目经验
            </h5>
            <ul>
              <li>
                <h5 style="margin: 10px 0px; font-size: 14px">关于您自己</h5>
                <el-form-item label-width="100px" label="我是" prop="">
                  <el-radio-group v-model="formQues.DoctorType">
                    <el-radio label="1">护士</el-radio>
                    <el-radio label="2">内科医生</el-radio>
                    <el-radio label="3">儿科医生</el-radio>
                    <el-radio label="4">家庭医生</el-radio>
                    <el-radio label="5">其他</el-radio>
                  </el-radio-group>
                  <el-input
                    style="width: 150px"
                    placeholder="限10字"
                    size="small"
                    v-model="formQues.DoctorType_Other"
                  >
                  </el-input>
                </el-form-item>
                <h3 style="margin-top: 20px">
                  我进行健康访谈干预在(勾选所有适用的选项)：
                </h3>
                <el-form-item label-width="" label="" prop="">
                  <el-checkbox-group v-model="formQues.Periods">
                    <el-checkbox label="1">孕前期</el-checkbox>
                    <el-checkbox label="2">怀孕期</el-checkbox>
                    <el-checkbox label="3">产后阶段</el-checkbox>
                  </el-checkbox-group>
                </el-form-item>
                <el-form-item
                  label-width="300px"
                  label="1.您认为您的角色对帮助研究对象获得健康的生活方式习惯有多重要?"
                  prop=""
                >
                  <el-radio-group v-model="formQues.Importance">
                    <el-radio label="1">一点也不</el-radio>
                    <el-radio label="2">一点点</el-radio>
                    <el-radio label="3">一般</el-radio>
                    <el-radio label="4">非常</el-radio>
                    <el-radio label="5">极其</el-radio>
                  </el-radio-group>
                </el-form-item>
                <p style="color: #999; margin: 10px 0px">
                  我们想知道对您来说，对研究对象使用“健康访谈技巧”的难易程度。“技巧”指访谈中的开放探索性问题(ODQs)。
                </p>
                <h3 style="margin-top: 30px; margin-bottom: 20px">
                  2.下列问题，请勾选最适用的选项
                </h3>
                <div class="parentDiv">
                  <table ref="tableDom">
                    <tr>
                      <td style="min-width: 250px">我不能使用技巧因为...</td>
                      <td>强烈同意</td>
                      <td>同意</td>
                      <td>不确定</td>
                      <td>不同意</td>
                      <td>非常不同意</td>
                    </tr>
                    <tr>
                      <td class="pdl">a.研究对象不喜欢</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        :class="{ active: formQues.Reason_a == item }"
                        width="100"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">b.这使与研究对象交流变困难</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_b == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">c.和某些研究对象的关系有点微妙</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_c == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">d.我不知道如何合理地运用技巧</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_d == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">e.不知道该怎么做</td>
                      <td
                        v-for="item in 5"
                        width="100"
                        :key="item"
                        style="cursor: pointer"
                        :class="{ active: formQues.Reason_e == item }"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">f.我不确定这些技巧是否有帮助</td>
                      <td
                        v-for="item in 5"
                        width="100"
                        :key="item"
                        style="cursor: pointer"
                        :class="{ active: formQues.Reason_f == item }"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">g.这些技巧看起来似乎和访谈没有关联</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_g == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">h.我不确信这样做是对的</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_h == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">i.我没有足够的时间</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_i == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">j.我没有找到机会用</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_j == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">k.我太忙或太累了</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_k == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                    <tr>
                      <td class="pdl">l.我觉得很难想起用这些技巧</td>
                      <td
                        v-for="item in 5"
                        :key="item"
                        width="100"
                        :class="{ active: formQues.Reason_l == item }"
                        style="cursor: pointer"

                      >
                        {{ item }}
                      </td>
                    </tr>
                  </table>
                  <p style="margin-top: 30px">
                    问题3到5与下列的健康访谈技巧(HCS)有关：
                  </p>
                  <p style="margin: 10px">-运用ODQs帮助某人探索问题</p>
                  <p style="margin: 10px">-反思自己的健康访谈过程</p>
                  <p style="margin: 10px">-更多的倾听</p>
                  <p style="margin: 10px">-运用ODQs帮助某人制定SMARTER计划</p>
                  <el-form-item
                    label-width="300px"
                    label="3.您对运用健康访谈技巧的喜欢程度"
                    prop=""
                  >
                    <el-radio-group v-model="formQues.SkillLove">
                      <el-radio label="1">一点也不</el-radio>
                      <el-radio label="2">一点点</el-radio>
                      <el-radio label="3">一般</el-radio>
                      <el-radio label="4">非常</el-radio>
                      <el-radio label="5">极其</el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item
                    label-width="300px"
                    label="4.您觉得健康访谈技巧对帮助研究对象改善生活方式习惯有多有用?"
                    prop=""
                  >
                    <el-radio-group v-model="formQues.Usefulness">
                      <el-radio label="1">一点也不</el-radio>
                      <el-radio label="2">一点点</el-radio>
                      <el-radio label="3">一般</el-radio>
                      <el-radio label="4">非常</el-radio>
                      <el-radio label="5">极其</el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <el-form-item
                    label-width="320px"
                    label="5.您对非生命树研究对象使用健康访谈技巧的频率"
                    prop=""
                  >
                    <el-radio-group v-model="formQues.Frequency">
                      <el-radio label="1">从不</el-radio>
                      <el-radio label="2">很少</el-radio>
                      <el-radio label="3">有时</el-radio>
                      <el-radio label="4">经常</el-radio>
                      <el-radio label="5">很经常</el-radio>
                    </el-radio-group>
                  </el-form-item>
                  <h4>
                    6.对您来说，将健康访谈技巧与日常工作结合起来有多大的挑战性
                  </h4>
                  <el-form-item label-width="" label="" prop="">
                    <el-rate
                      v-model="formQues.challenge"
                      style="margin: 20px"
                      :max="10"
                      :texts="[
                        '完全没有挑战性',
                        '极少有挑战性',
                        '有一点点挑战性',
                        '很少挑战性',
                        '有点挑战性',
                        '有挑战性',
                        '一般有挑战性',
                        '经常有挑战性',
                        '时常有挑战性',
                        '非常有挑战性',
                      ]"
                      show-text
                    >
                    </el-rate>
                  </el-form-item>
                </div>
                <p>7.列出三个能让将健康访谈技巧和日常工作结合变容易的事情</p>
                <el-form-item label-width="" label="" prop="">
                  <el-input
                    style="margin: 10px 0"
                    placeholder="限100字"
                    type="textarea"
                    :rows="3"
                    v-model="formQues.EasyThing1"
                  >
                  </el-input>
                  <el-input
                    placeholder="限100字"
                    type="textarea"
                    style="margin: 10px 0"
                    :rows="3"
                    v-model="formQues.EasyThing2"
                  >
                  </el-input>
                  <el-input
                    style="margin: 10px 0"
                    placeholder="限100字"
                    type="textarea"
                    :rows="3"
                    v-model="formQues.EasyThing3"
                  >
                  </el-input>
                </el-form-item>
                <p>8.列出三个能让将健康访谈技巧和日常工作结合变困难的事情</p>
                <el-form-item label-width="" label="" prop="">
                  <el-input
                    style="margin: 10px 0"
                    placeholder="限100字"
                    type="textarea"
                    :rows="3"
                    v-model="formQues.DifficultThing1"
                  >
                  </el-input>
                  <el-input
                    placeholder="限100字"
                    type="textarea"
                    style="margin: 10px 0"
                    :rows="3"
                    v-model="formQues.DifficultThing2"
                  >
                  </el-input>
                  <el-input
                    style="margin: 10px 0"
                    placeholder="限100字"
                    type="textarea"
                    :rows="3"
                    v-model="formQues.DifficultThing3"
                  >
                  </el-input>
                </el-form-item>
                <p style="margin: 10px 0">
                  9.关于有助于将健康访谈技巧和日常工作结合的策略，您有什么建议?
                </p>
                <el-input
                  style="margin: 10px 0"
                  placeholder="限500字"
                  type="textarea"
                  :rows="3"
                  v-model="formQues.Advice"
                >
                </el-input>
                <p style="margin: 10px 0">
                  10.您对项目组提供给研究对象帮助其改善生活方式习惯的其他资源是否满意(如母乳喂
                  养热线，营养门诊，健康教育课程)?
                </p>
                <el-form-item label-width="" label="" prop="">
                  <el-radio-group v-model="formQues.Satisfaction_Team">
                    <el-radio label="1">一点也不</el-radio>
                    <el-radio label="2">一点点</el-radio>
                    <el-radio label="3">一般</el-radio>
                    <el-radio label="4">非常</el-radio>
                    <el-radio label="5">极其</el-radio>
                  </el-radio-group>
                </el-form-item>
                <p style="margin: 10px 0">
                  11.您对生命树网站帮助您进行健康访谈干预的满意程度?
                </p>
                <el-form-item label-width="" label="" prop="">
                  <el-radio-group v-model="formQues.Satisfaction_Website">
                    <el-radio label="1">一点也不</el-radio>
                    <el-radio label="2">一点点</el-radio>
                    <el-radio label="3">一般</el-radio>
                    <el-radio label="4">非常</el-radio>
                    <el-radio label="5">极其</el-radio>
                  </el-radio-group>
                </el-form-item>
                <p style="margin: 10px 0">
                  12.评估员对您访谈录音的反馈是否有助于保持或提升您的健康访谈技巧?
                </p>
                <el-form-item label-width="" label="" prop="">
                  <el-radio-group
                    v-model="formQues.Satisfaction_SoundRecording"
                  >
                    <el-radio label="1">一点也不</el-radio>
                    <el-radio label="2">一点点</el-radio>
                    <el-radio label="3">一般</el-radio>
                    <el-radio label="4">非常</el-radio>
                    <el-radio label="5">极其</el-radio>
                  </el-radio-group>
                </el-form-item>
              </li>
            </ul>
          </div>
        </el-form>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogForm9 = false">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { mapGetters } from "vuex";
import {DIC_PERIODA,filterPeriod} from '@/utils/localDic'
export default {
  props:["partInfo","index"],
  data() {
    return {
      searchData: {
        roleGroup: "",
        period: "",
        actualFollowUpType: "",
        pointOfTime: "",
        insideState: "",
        outsideState: "",
        scoreType: "",
        nurseId: "",
      },
      formFeedback:{},
      rules1: {
        SkillUse: [{ required: true, message: "必填项", trigger: "change" }],
        Question: [{ required: true, message: "必填项", trigger: "change" }],
        Question_Score: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Question_AssessState: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Question_UnAssessReason: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Feedback: [{ required: true, message: "必填项", trigger: "change" }],
        Feedback_Score: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Feedback_AssessState: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Feedback_UnAssessReason: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Listen: [{ required: true, message: "必填项", trigger: "change" }],
        Listen_Score: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Listen_AssessState: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Listen_UnAssessReason: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        SmarterPlan: [{ required: true, message: "必填项", trigger: "change" }],
        Plan_Score: [{ required: true, message: "必填项", trigger: "change" }],
        Plan_AssessState: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        Plan_UnAssessReason: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        SkillUse: [{ required: true, message: "必填项", trigger: "change" }],
        FeedbackToExecutor: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        DiscussQuestion: [
          { required: true, message: "必填项", trigger: "change" },
        ],
        NeedView: [{ required: true, message: "必填项", trigger: "change" }],
      },
       rules2: {
        OtherDiscuss: [{ required: true, message: "必填项", trigger: "change" }],
        DiscussQuestion: [{ required: true, message: "必填项", trigger: "change" }],
        FeedbackToExecutor: [{ required: true, message: "必填项", trigger: "change" }],
        ObservationNote: [{ required: true, message: "必填项", trigger: "change" }],
      },
      rules3: {
        IsNewestHealthTable: [{ required: true, message: "必填项", trigger: "change" }],
        IsActualMatchPlan: [{ required: true, message: "必填项", trigger: "change" }],
        IsCompleteAnthropometry: [{ required: true, message: "必填项", trigger: "change" }],
        IsCompleteCustomRecord: [{ required: true, message: "必填项", trigger: "change" }],
        IsCompletePlan: [{ required: true, message: "必填项", trigger: "change" }],
        IsCompleteCRF: [{ required: true, message: "必填项", trigger: "change" }],
      },
      ActualFollowUpTypeFilter(row, column, cellValue) {
        if (cellValue == "1") {
          return "面对面";
        } else if (cellValue == "2") {
          return "电话";
        } else if (cellValue == "3") {
          return "微信视频";
        } else {
          return "";
        }
      },
      PeriodFilter(row, column, cellValue, index) {
        return filterPeriod(cellValue)
      },
      PointOfTimeFilter(row, column, cellValue, index) {
        return cellValue ? cellValue + "个月" : "-";
      },
      RoleGroupFilter(row, column, cellValue, index) {
        return cellValue == "3"
          ? "健康访谈人员"
          : cellValue == "7"
          ? "社区HCP干预组"
          : cellValue == "8"
          ? "社区HCP对照组"
          : "-";
      },
      SearchoptionsNurse: [],
      optionZk: [
        { value: "", label: "全部" },
        { value: "1", label: "1个月" },
        { value: "3", label: "3个月" },
        { value: "6", label: "6个月" },
        { value: "12", label: "12个月" },
        { value: "18", label: "18个月" },
        { value: "24", label: "24个月" },
        { value: "30", label: "30个月" },
        { value: "36", label: "36个月" },
        { value: "42", label: "42个月" },
        { value: "48", label: "48个月" },
        { value: "54", label: "54个月" },
        { value: "60", label: "60个月" },
        { value: "66", label: "66个月" },
        { value: "72", label: "72个月" },
        { value: "78", label: "78个月" },
        { value: "84", label: "84个月" },
        { value: "90", label: "90个月" },
        { value: "96", label: "96个月" },
      ],
      options2sp: DIC_PERIODA,
      alls: [
        { value: "1", label: "面对面" },
        { value: "2", label: "电话" },
        { value: "3", label: "微信视频" },
      ],
      optionDiq1: [],
      optionsData1: [], //社区数据
      timeDate: [],
      formScore: {
        Question: "",
        Question_Score: "",
        Question_AssessState: "0",
        Question_UnAssessReason: "",
        Feedback: "",
        Feedback_Score: "",
        Feedback_AssessState: "0",
        Feedback_UnAssessReason: "",
        Listen: "",
        Listen_Score: "",
        Listen_AssessState: "0",
        Listen_UnAssessReason: "",
        SmarterPlan: "",
        Plan_Score: "",
        Plan_AssessState: "0",
        Plan_UnAssessReason: "",
        SkillUse: "",
        FeedbackToExecutor: "",
        DiscussQuestion: "",
        NeedView: "",
        TotalScore: "",
        AvarageScore: "",
      },
      formQues:{
        challenge: "",
         DoctorType:"",
         DoctorType_Other:"",
        Reason_a: "",
        Reason_b: "",
        Reason_c: "",
        Reason_d: "",
        Reason_e: "",
        Reason_f: "",
        Reason_g: "",
        Reason_h: "",
        Reason_i: "",
        Reason_j: "",
        Reason_k: "",
        Reason_l: "",
        Satisfaction_SoundRecording: "",
        Satisfaction_Website: "",
        Satisfaction_Team: "",
        Advice: "",
        DifficultThing3: "",
        DifficultThing2: "",
        DifficultThing1: "",
        EasyThing3: "",
        EasyThing2: "",
        EasyThing1: "",
        Frequency: "",
        Usefulness: "",
        SkillLove: "",
        Importance: "",
        Periods: [],
      },
      pickerOptions: {
        shortcuts: [
          {
            text: "最近一周",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近一个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
              picker.$emit("pick", [start, end]);
            },
          },
          {
            text: "最近三个月",
            onClick(picker) {
              const end = new Date();
              const start = new Date();
              start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
              picker.$emit("pick", [start, end]);
            },
          },
        ],
      },
      pageId: 1,
      total: null,
      loading: true,
      pageSize: 10,
      tableData: [],
      maxHeight: "",
      CtyIds: "",
      CtyIdsTo: "",
      optionsData2: [],
      rowOff1: false,
      dialogForm1: false,
      dialogForm2: false,
      dialogForm3:false,
      dialogForm9:false,
      dataObj: {},
      formReport:{
        ObservationNote:"",
        FeedbackToExecutor:"",
        DiscussQuestion:"",
        OtherDiscuss:"",
      },
      dialogForm6:false,
      formCrf:{
        IsCompleteCRF:"",
        IsCompletePlan:"",
        IsCompleteCustomRecord:"",
        IsCompleteAnthropometry:"",
        IsActualMatchPlan:"",
        IsCompleteChildDevelopment:"",
        IsCompletePreWeight:"",
        IsNewestHealthTable:"",
      }
    };
  },
  async mounted() {
    let that = this;
    let now = new Date();
    let nowTime = now.getTime();
    let day = now.getDay();
    if (day == 0) {
      //西方从周日算为第一天    2018/10/28
      day = 7;
    }
    let oneDayLong = 24 * 60 * 60 * 1000;
    let MondayTime = nowTime - (day - 1) * oneDayLong;
    let SundayTime = nowTime + (7 - day) * oneDayLong;
    let monday = dateForm(new Date('2019-01-01'));
    let sunday = dateForm(new Date(SundayTime));
    that.timeDate = [
      //初始化时间范围
      monday,
      sunday,
    ];
    this.searchData.nurseId = this.partInfo||""
    this.getList();

  },
  beforeMount() {
    let that = this;
    let appHeight = $(window).height();
    let autoheight = appHeight - 250 + "px";
    that.maxHeight = autoheight;
    that.GetNurse(); // 获取干预护士
    console.log(this.userIcon)
  },
  watch:{
    index:{
      handler:function(index){
        if(index=='2'){
          console.log(this.partInfo)
          this.searchData.nurseId = this.partInfo||""
          this.getList();
        }
      },
    }
  },
  computed: {
    ...mapGetters(["userIcon", "userId", "token", "RoleGroup", "UserDic"]),
  },
  methods: {
    handleSelfReport(row){  //自我报告表
      this.service({
        url: "/QC/GetDoctorSelfReport",
        method: "get",
        params: {
          qcId: row.SYS_ID,
        },
      }).then((e) => {
        this.dialogForm9 = true
        if(e.dtData.length>0) {
           this.formQues = e.dtData[0]
           this.formQues.Periods ? this.formQues.Periods = this.formQues.Periods.split(',') :''
        }

      });
    },
    handleFeedback(row, index) {
      //自我反馈表
      if (index == 2) {
        this.service({
          url: "/QC/GetSelfFeedback",
          method: "get",
          params: {
            qcId: row.SYS_ID,
          },
        }).then((res) => {
          this.$nextTick(() => {
            this.$refs["formFeedback"]
              ? this.$refs["formFeedback"].resetFields()
              : "";
            this.dialogForm6 = true;
            this.formFeedback = res.dtData[0];
            this.formFeedback.ConfidenceLevel = parseInt(this.formFeedback.ConfidenceLevel || 0)
            this.formFeedback.Importance = parseInt(this.formFeedback.Importance || 0)
            console.log(res.dtData[0])
          });
        });
      } else {
        this.$nextTick(() => {
          this.$refs["formFeedback"]
            ? this.$refs["formFeedback"].resetFields()
            : "";
          this.dialogForm6 = true;
        });
      }
      this.dataObj = row;
    },
    download(row) {
      let httpL = "";
      window.location.href.indexOf("https") >= 0
        ? (httpL = "https://")
        : (httpL = "http://");
      let httpName = httpL + window.location.host + "/upload/File/";
      window.open(httpName + row.SoundRecording + "?attname=" + row.SoundRecording);
    },
    changeScore(){
      let num =4
      if(this.formScore.Question_AssessState == 1){
        num = num-1
      }
      if(this.formScore.Feedback_AssessState == 1){
        num = num-1
      }
      if(this.formScore.Listen_AssessState == 1){
        num = num-1
      }
      if(this.formScore.Plan_AssessState == 1){
        num = num-1
      }
      this.formScore.TotalScore = parseInt(this.formScore.Question_Score || 0)+
      parseInt(this.formScore.Feedback_Score|| 0)+
      parseInt(this.formScore.Listen_Score|| 0)+
      parseInt(this.formScore.Plan_Score|| 0)
      this.formScore.AvarageScore = this.formScore.TotalScore/num
    },
    closeed(formName){
    },

    removeReport(){
      console.log(this.dataObj)
       this.$confirm('此操作将删除该记录, 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          this.service({
            url: "/QC/DeleteFieldObservationCaseReport",
              method: "post",
              data: {
                ...this.dataObj
              },
          }).then(res =>{
             this.$message({
              type: 'success',
              message: '删除成功!'
            });
            this.getList()
          this.dialogForm2 = false;
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          });
        });
    },
    handleCRF(row,index){  //流程质控crf
      this.formCrf.IsCompletePreWeight =""
      this.formCrf.IsCompleteChildDevelopment = ""
       if(index == 2){
        this.service({
          url: "/QC/GetCRF",
          method: "get",
          params: {
            qcId: row.SYS_ID,
          },
        }).then(res =>{
           this.$nextTick(() =>{
            this.$refs['formCrf']?this.$refs['formCrf'].resetFields():"";
            this.dialogForm3 = true;
            this.formCrf = res.dtData[0]
          })
        })
      }
      else{
          this.$nextTick(() =>{
            this.$refs['formCrf']?this.$refs['formCrf'].resetFields():"";
            this.formCrf = {
              IsCompleteCRF:"",
              IsCompletePlan:"",
              IsCompleteCustomRecord:"",
              IsCompleteAnthropometry:"",
              IsActualMatchPlan:"",
              IsCompleteChildDevelopment:"",
              IsCompletePreWeight:"",
              IsNewestHealthTable:"",
            }
            this.dialogForm3= true;
          })
      }
      this.dataObj = row;
    },
    handleReport(row,index,){  //现场案例观察报告表
       if(index == 2){
        this.service({
          url: "/QC/GetFieldObservationCaseReport",
          method: "get",
          params: {
            qcId: row.SYS_ID,
          },
        }).then(res =>{
           this.$nextTick(() =>{
            this.$refs['formReport']?this.$refs['formReport'].resetFields():"";
            this.dialogForm2 = true;
            this.formReport = res.dtData[0]
          })
        })
      }
      else{
          this.$nextTick(() =>{
            this.$refs['formReport']?this.$refs['formReport'].resetFields():"";
            this.formReport = {
               ObservationNote:"",
              FeedbackToExecutor:"",
              DiscussQuestion:"",
              OtherDiscuss:"",
            }
            this.dialogForm2 = true;
          })
      }
      this.dataObj = row;
    },
    handleScore(row,index,type) {
      //内部工具
      if(index == 2){
        this.service({
          url: "/QC/GetScoringTool",
          method: "get",
          params: {
            qcId: row.SYS_ID,
            scoringType:type,
          },
        }).then(res =>{
           this.$nextTick(() =>{
            this.$refs['formScore']?this.$refs['formScore'].resetFields():"";
            this.dialogForm1 = true;
            this.formScore = res.dtData[0]
          })
        })
      }
      else{
          this.$nextTick(() =>{
            this.$refs['formScore']?this.$refs['formScore'].resetFields():"";
            this.formScore ={
              Question: "",
              Question_Score: "",
              Question_AssessState: "",
              Question_UnAssessReason: "",
              Feedback: "",
              Feedback_Score: "",
              Feedback_AssessState: "",
              Feedback_UnAssessReason: "",
              Listen: "",
              Listen_Score: "",
              Listen_AssessState: "",
              Listen_UnAssessReason: "",
              SmarterPlan: "",
              Plan_Score: "",
              Plan_AssessState: "",
              Plan_UnAssessReason: "",
              SkillUse: "",
              FeedbackToExecutor: "",
              DiscussQuestion: "",
              NeedView: "",
              TotalScore: "",
              AvarageScore: "",
            }
             this.dialogForm1 = true;
          })
      }
      row.type = type
      this.dataObj = row;
    },
    submitCrf(formName){ //保存CRF
      if (this.rowOff1) {
        return false;
      }
      if(this.formCrf.IsCompletePreWeight == "" && this.formCrf.IsCompleteChildDevelopment == ""){
        this.$message({
          message:"第二题和第三题必填一项",
          type:"info"
        })
        return false;
      }
      this.rowOff1 = true;
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.service({
            url: "/QC/SaveCRF",
            method: "post",
            data: {
              ...this.formCrf,
              QCId: this.dataObj.SYS_ID,
              FollowUpId:this.dataObj.FollowUpId,
            },
          })
            .then((response) => {
              this.$message({
                message: response.msg,
                type: "success",
              });
              this.getList()
              this.dialogForm3 = false;
              this.rowOff1 = false;
            })
            .catch((e) => {
              this.rowOff1 = false;
            });
        } else {
          this.rowOff1 = false;
          return false;
        }
      });
    },
    submitReport(formName){  //提交现场勘察报告
      if (this.rowOff1) {
        return false;
      }
      this.rowOff1 = true;
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.service({
            url: "/QC/SaveFieldObservationCaseReport",
            method: "post",
            data: {
              ...this.formReport,
              QCId: this.dataObj.SYS_ID,
              FollowUpId:this.dataObj.FollowUpId,
            },
          })
            .then((response) => {
              this.$message({
                message: response.msg,
                type: "success",
              });
              this.getList()
              this.dialogForm2 = false;
              this.rowOff1 = false;
            })
            .catch((e) => {
              this.rowOff1 = false;
            });
        } else {
          this.rowOff1 = false;
          return false;
        }
      });
    },
    submitScore(formName, index = 1) {
      //提交工具评估
      if (this.rowOff1) {
        return false;
      }
      this.rowOff1 = true;
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.formScore.ScoringType = this.dataObj.type;
          this.service({
            url: "/QC/SaveScoringTool",
            method: "post",
            data: {
              ...this.formScore,
              QCId: this.dataObj.SYS_ID,
              FollowUpId:this.dataObj.FollowUpId,
            },
          })
            .then((response) => {
              this.$message({
                message: response.msg,
                type: "success",
              });
              this.getList()
              this.dialogForm1 = false;
              this.rowOff1 = false;
            })
            .catch((e) => {
              this.rowOff1 = false;
            });
        } else {
          this.rowOff1 = false;
          return false;
        }
      });
    },
    changeFollowUp(row,value,type) {
      if(type == 1){
        this
        .service({
          url:"/QC/SaveInsideInfo",
          method: "post",
          data: {
            SYS_ID:row.SYS_ID,
            InsideRemark:row.InsideRemark ||"",
            InsideState:row.InsideState ||"",
            InsideNurseId:this.token,
            InsideNurse:this.userIcon
          },
        })
        .then((response) => {
          this.getList()
        })
        .catch((data) => {this.getList()});
      }
      else{
        this
        .service({
          url:"/QC/SaveOutsideInfo",
          method: "post",
          data: {
            SYS_ID:row.SYS_ID,
            OutsideRemark:row.OutsideRemark ||"",
            OutsideState:row.OutsideState ||"",
            OutsideNurseId:this.token,
            OutsideNurse:this.userIcon
          },
        })
        .then((response) => {
          this.getList()
        })
        .catch((data) => {this.getList()});
      }
    },
    GetNurse: function () {
      let that = this;
      that
        .service({
          url: "/Sys/GetNurseForFollowup",
          method: "get",
          params: {
            communityId: JSON.parse(this.UserDic).CommunityId || "",
          },
        })
        .then((response) => {
          that.SearchoptionsNurse = response.dtData;
        })
        .catch((data) => {});
    },
    checkList: function () {
      //查询
      this.pageId = 1;
      this.pageSize = 10;
      this.total = null;
      this.getList();
    },
    handleSizeChange(val) {
      //条数改变
      this.pageSize = val;
      this.getList();
    },
    handleCurrentChange(val) {
      //页数改变
      this.pageId = val;
      this.getList();
    },
    getList: function () {
      //获取一级信息列表
      let that = this;
      that.loading = true;
      that
        .service({
          url: "/QC/GetQCForSystem",
          method: "get",
          params: {
            pageCount: that.pageId - 1,
            pageSize: that.pageSize,
            startDate: that.timeDate ? that.timeDate[0] : "",
            endDate: that.timeDate ? that.timeDate[1] : "",
            ...that.searchData,
          },
        })
        .then((response) => {
          console.log(response);
          that.tableData = response.dtData;
          that.total = parseInt(response.dtData[0].TotalCount);
          that.loading = false;
        })
        .catch((data) => {
          that.loading = false;
        });
    },
  },
};
function addZero(s) {
  return s < 10 ? "0" + s : s;
}
function dateForm(data) {
  return (
    new Date(data).getFullYear() +
    "-" +
    addZero(new Date(data).getMonth() + 1) +
    "-" +
    addZero(new Date(data).getDate())
  );
}
</script>
<style scoped lang="scss">
.click_line {
  cursor: pointer;
  color: #409eff;
}
.pagination-fixed {
  position: static;
}
.formScore {
  ul {
    li {
      margin-top: 20px;
      h3 {
        color: #333;
        font-weight: normal;
        font-size: 12px;
      }
      p {
        font-size: 14px;
        color: #666;
      }
    }
  }
}
.parentDiv {
  margin: 15px 0px;
  table {
    width: 100%;
    border-collapse: collapse;
    tr {
      td {
        border: 1px solid #dcdfe6;
        box-sizing: border-box;
        padding: 8px 0px;
        text-align: center;
        color: #606266;
      }
      .active {
        background: #2da3fb;
        color: #fff;
      }
    }
  }
}
</style>
